sudo cp 58-riki.rules /etc/udev/rules.d/
sudo cp 56-orbbec-usb.rules /etc/udev/rules.d/
sudo cp 60-respeaker.rules /etc/udev/rules.d/
#sudo apt-get update
ver=$(rosversion -d)
#sudo apt-get install -y git vim
sudo apt-get install libpcap-dev -y
sudo apt-get install -y camorama
sudo apt install -y  cutecom
sudo apt-get install -y gfortran
sudo apt-get install -y portaudio19-dev sox libsox-fmt-mp3 python-pip python3-pip
sudo apt-get install -y libv4l-dev 
sudo apt-get install -y libgeographic-dev
sudo apt-get install -y build-essential
sudo apt-get install -y chrony
sudo apt-get install -y libudev-dev
sudo apt-get install -y libusb-dev libpcap-dev
sudo apt-get install -y python3-sklearn
sudo apt install -y qtmultimedia5-dev
sudo apt-get install -y ros-$ver\-roslint
sudo apt-get install -y ros-$ver-libuvc
sudo apt-get install -y ros-$ver-ddynamic-reconfigure 
sudo apt-get install -y ros-$ver\-serial
sudo apt-get install -y ros-$ver\-rosserial
sudo apt-get install -y ros-$ver\-gmapping
sudo apt-get install -y ros-$ver\-navigation
sudo apt-get install -y ros-$ver\-map-server
sudo apt-get install -y ros-$ver\-rgbd-launch
sudo apt-get install -y ros-$ver\-costmap-2d
sudo apt-get install -y ros-$ver\-camera-info-manager
sudo apt-get install -y ros-$ver\-image-transport
sudo apt-get install -y ros-$ver\-teleop-twist-keyboard 
sudo apt-get install -y ros-$ver\-robot-upstart
sudo apt-get install -y ros-$ver\-slam-karto
sudo apt-get install -y ros-$ver\-geographic-msgs 
sudo apt-get install -y ros-$ver\-rosbridge-suite
sudo apt-get install -y ros-$ver\-robot-pose-publisher
sudo apt-get install -y ros-$ver\-tf2-web-republisher
sudo apt-get install -y ros-$ver\-web-video-server
sudo apt-get install -y ros-$ver\-vision-msgs
sudo apt-get install -y ros-$ver\-ar-track-alvar
sudo apt-get install -y ros-$ver\-cartographer-ros
sudo apt-get install -y ros-$ver\-audio-common-msgs
sudo apt-get install -y ros-$ver\-cartographer-rviz ros-$ver\-cartographer-ros  ros-$ver\-rtabmap-ros ros-melodic-$ver\-local-planner
sudo apt-get install -y ros-$ver\-realsense2-camera
sudo apt-get install -y ros-$ver\-rtabmap-ros
sudo apt-get install -y ros-$ver\-hector-slam
sudo apt-get install -y ros-$ver\-teb-local-planner
sudo apt-get install -y ros-$ver\-multirobot-map-merge ros-$ver\-explore-lite
sudo apt-get install -y ros-melodic-moveit-core ros-melodic-moveit-ros-perception ros-melodic-moveit-ros-planning-interface ros-melodic-moveit
sudo apt-get install -y ros-melodic-trac-ik-kinematics-plugin
sudo apt-get install -y python-scikits-learn


sudo -H pip2 install setuptools_scm -i https://pypi.tuna.tsinghua.edu.cn/simple
sudo -H pip2 install pyaudio==0.2.11   baidu-aip SpeechRecognition==3.8.0 pixel-ring pyusb imutils  -i https://pypi.tuna.tsinghua.edu.cn/simple
sudo -H pip2 install dlib==19.7.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
sudo -H pip2 install face_recognition  -i  https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install pycuda==2019.1.2 -i  https://pypi.tuna.tsinghua.edu.cn/simple


echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

sudo usermod -aG dialout $USER
sudo usermod -aG video $USER

echo "ROS Packages Installed Successfully"
